﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Common;

namespace Library.Entity
{
    public class User : IdCodeName
    {
        public string SESSION_ID = "";
        public string Password = "";
        public bool Active = false;
        
        public User()
        {
        }
        public User(DbDataReader dr)
        {
            Id = DataConversion.ConvertToInt32(dr, "id");
            Code = DataConversion.ConvertToString(dr, "code");
            Name = DataConversion.ConvertToString(dr, "name");
            Remark = DataConversion.ConvertToString(dr, "remark");
            CreatedDate = DataConversion.ConvertToDateTime(dr, "createdDate");
            ModifiedDate = DataConversion.ConvertToDateTime(dr, "modifiedDate");
            CreatedUserId = DataConversion.ConvertToInt32(dr, "createdUserId");
            ModifiedUserId = DataConversion.ConvertToInt32(dr, "modifiedUserId");
            Password = DataConversion.ConvertToString(dr, "password");
            Active = DataConversion.ConvertToBoolean(dr, "active");
        }
    }
}